package com.example.study.mapper;

import com.example.study.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select * from user where id = #{id}")
    User getUser(Long id);
    @Select("select * from user where username = #{username}")
    User getUserByName(String username);
    @Insert("insert into user (username, password) values (#{username}, #{password})")
    Integer insertUser(User user);
}
